  <div class="row">
      <div class="col-lg-12">
          <section class="panel">
              <header class="panel-heading">
                  商家列表
              </header>
              <div class="panel-body">
                <div class="clearfix">
                    <div class="btn-group">
                        <span class="btn btn-primary" >
                          <%= link_to fa_icon("plus"), new_admin_merchant_path %>
                        </span>
                    </div>
                </div>
                <div class="space15"></div>

                <table class="table table-striped table-advance table-hover">
                  <thead>
                    <tr>
                      <th><%= t(".email") %></th>
                      <th><%= t(".name") %></th>
                      <th><%= t(".industry") %></th>
                      <th><%= t(".province") %></th>
                      <th><%= t(".city") %></th>
                      <th><%= t(".area") %></th>
                      <th><%= t(".circle") %></th>
                      <th><%= t(".address") %></th>
                      <th><%= t(".contact_person_name") %></th>
                      <th><%= t(".contact_way") %></th>
                      <th><%= t(".secondary") %></th>
                      <th colspan="3"></th>
                    </tr>
                  </thead>

                  <tbody>
                    <% @merchants.each do |merchant| %>
                      <tr>
                        <td><%= merchant.email %></td>
                        <td><%= merchant.merchant_info.try(:name) %></td>
                        <td><%= merchant.merchant_info.try(:industry) %></td>
                        <td><%= merchant.merchant_info.try(:province) %></td>
                        <td><%= merchant.merchant_info.try(:city) %></td>
                        <td><%= merchant.merchant_info.try(:area) %></td>
                        <td><%= merchant.merchant_info.try(:circle) %></td>
                        <td><%= merchant.merchant_info.try(:address) %></td>
                        <td><%= merchant.merchant_info.try(:contact_person_name) %></td>
                        <td><%= merchant.merchant_info.try(:contact_way) %></td>
                        <td><%= merchant.merchant_info.try(:secondary) %></td>
                        <td>
                          <span class="btn btn-success btn-xs"><%= link_to fa_icon("check"), [:admin, merchant] %></span>
                          <span class="btn btn-primary btn-xs"><%= link_to fa_icon("pencil"), edit_admin_merchant_path(merchant) %><i class="icon-pencil"></i></span>
                          <span class="btn btn-danger btn-xs"><%= link_to fa_icon("trash-o"), [:admin, merchant], method: :delete, data: { confirm: 'Are you sure?' } %></span>
                        </td>
                      </tr>
                    <% end %>
                  </tbody>
              </table>
              </div>
          </section>
      </div>
  </div>
  <!-- page end-->

